#include <cctype>
#include <iostream>
#include<string.h>
#include<string>
using namespace std;

int main() {
    string s;
    cin >> s;
    int len = 0;
    int begin = -1, end = 0;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] >= '0' && s[i] <= '9') {
            int j = i;
            while (j < s.size() && s[j] >= '0' && s[j] <= '9') j++;
            if (j - i > len) {
                begin = i;
                len = j - i;
            }
            i = j;
        }
    }
    if (begin == -1) cout << "" << endl;
    else cout << s.substr(begin, len) << endl;
    return 0;
}